<!DOCTYPE html>
<html>
<head>
<style type="text/css">
table{width:900px}
table td,table th{border:1px solid #CCC}
a{margin-bottom: 5px;}
</style>
<meta http-equiv="content-type" content="text/html; charset=utf-8" charset="utf-8" />
<script type="text/javascript" src="jquery-1.9.1.js"></script>
<script type="text/javascript">

$(function(){
	loaddata();
});
function loaddata(){
	$("#exceldata").html("");
	$("#jsondata").html("");
	$.get("ds.do",function(data){
		var d=eval('('+data+')');
		$(d.exceldata).each(function(i,item){
			$("#exceldata").append("<a href='data/excel/"+item+"' >"+item+"</a>").append("<br>").append("<br>");
		})
		$(d.jsondata).each(function(i,item){
			$("#jsondata").append("<a href='data/json/"+item+"' >"+item+"</a>").append("<br>").append("<br>");
		})
	})
}
function getdata(){
	$.get("air.do",function(){
		loaddata();
	})
}
</script>
</head>
<body>
<h2>空气污染及天气数据下载列表</h2>
<input type="button" value="获取最新数据" onclick="getdata()"/>
<input type="button" value="查看日志" onclick="window.location.href='log.html'"/>
	<table>
		<tr>
			<th>excel data</th>
			<th>json data</th>
		</tr>
		<tr>
			<td><div id="exceldata"></div></td>
			<td><div id="jsondata"></div></td>
		</tr>
	</table>

	
	
</body>
</html>